# class Person():
#     def __init__(self,name):
#         self.name = name
# hunter = Person('Elmer Fudd')
# print('The mighty hunter:',hunter.name)


# class Car():
#     def exclaim(self):
#         print("i'm a car")
# class Yugo(Car):
#     def exclaim(self):
#         print("I'm a yugo ! much like a car ,but more yugo-ish");
#
# give_me_a_car = Car()
# give_me_a_yugo = Yugo()
# give_me_a_car.exclaim()

# class Person():
#     def __init__(self,name):
#         self.name = name
#
# class MDPerson(Person):
#     def __init__(self,name):
#         self.name = "Doctor "+ name
# class JDPerson(Person):
#     def __init__(self,name):
#         self.name = name + ",Esquire"
#
# person = Person('Fudd')
# doctor = MDPerson('Fudd')
# lawyer = JDPerson('Fudd')
#
#
# print(person.name,doctor.name,lawyer.name)


# class Duck():
#     def __init__(self, input_name):
#         self.hidden_name = input_name
#     def name(self):
#         print('inside the getter')
#         return self.hidden_name
#     def name(self, input_name):
#         print('inside the setter')
#         self.hidden_name = input_name
#
# fowl = Duck('Howard')
#
# print(fowl.name)
#
# fowl.name = 'Donald'
# print(fowl.name)

# class Circle():
#     def __init__(self,radius):
#         self.radius = radius
#     def diameter(self):
#         return 2 * self.radius
#
# c = Circle(5)
# print(c.diameter())


# class Duck():
#     def __init__(self,input_name):
#         self.__name = input_name
#     @property
#     def name(self):
#         return self.__name
#     @name.setter
#     def name(self,input_name):
#         print("inside the setter")
#         self.__name = input_name
# fowl = Duck('Howard')
# print(fowl.name)
#
# fowl.name = 'local'
# print(fowl.name)
#
# print(fowl.__name)

# class A():
#     count = 0
#     def __init__(self):
#         A.count += 1
#     def exclaim(self):
#         print("i'rm  a a")
#     @classmethod
#     def kids(cls):
#         print("A has",cls.count,"litter objects")
#
#
# easy_a = A()
# breezy_a = A()
# wheezy_a = A()
# A.kids()

# class CoyoteWeapon():
#     @staticmethod
#     def commercial():
#         print("this CoyoteWeapon has been brounght to you by Acme")
#
# CoyoteWeapon.commercial()

# class Quote():
#     def __init__(self,person,words):
#         self.person = person
#         self.words = words
#     def who(self):
#         return self.person
#     def says(self):
#         return self.words + '.'
#
# class QuestionQuote(Quote):
#     def says(self):
#         return self.words + '?'
# class ExclamationQuote(Quote):
#     def says(self):
#         return self.words + '!'
#
# hunter = Quote('Elmer Fudd', "I'm hunting wabbits")
# print(hunter.who(), 'says:', hunter.says())
# hunted1 = QuestionQuote('Bugs Bunny', "What's up, doc")
# print(hunted1.who(), 'says:', hunted1.says())
# hunted2 = ExclamationQuote('Daffy Duck', "It's rabbit season")
# print(hunted2.who(), 'says:', hunted2.says())

#
# class BabblingBrook():
#     def who(self):
#         return "brook"
#     def says(self):
#         return "Babble"
# brook = BabblingBrook()
#
# def who_says(obj):
#     print(obj.who(),'says',obj.says)
#
# who_says('')

# class Word():
#     def __init__(self,text):
#         self.text = text
#     def __eq__(self,word2):
#         return self.text.lower() == word2.text.lower()
#
# first = Word('ha')
# second = Word('HA')
# third = Word('eh')
#
# print(first == second)

# class Word():
#     def __init__(self,text):
#         self.text = text
#     def __eq__(self,word2):
#         return self.text.lower() == word2.text.lower()
#     def __str__(self):
#         return self.text
#     def __repr__(self):
#         return 'Word("' +self.text+'")'
#
# first = Word('ha')
# first
# print(first)

# class Bill():
#     def __init__(self,description):
#         self.description = description
#
# class Tail():
#     def __init__(self,length):
#         self.length = length
# class Duck():
#     def __init__(self,bill,tail):
#         self.bill = bill
#         self.tail = tail
#     def about(self):
#         print("this duck has a ",bill.description,'bill and a ',tail.length,'tail')
#
#
# tail = Tail('long')
# bill = Bill('wide orange')
#
# duck = Duck(bill,tail)
# duck.about()

# class Ting:
#     pass
#
# print(Ting)
#
# example = Ting()
# print(example)

# class Thing2:
#     letters = 'abc'
#
# print(Thing2.letters)

# class Thing3:
#     def __init__(self):
#         self.letters = 'xyz'
#
# # print(Thing3.letters)
#
# some = Thing3()
# print(some.letters)

# class Element:
#     def __init__(self,name,symbool,number):
#         self.name = name
#         self.symbool = symbool
#         self.number = number
#
# hy = Element('Hydrogen', 'H', 1)
# print(hy)

# el_dict = {
#     'name' : 'Hydrogen',
#     'symbool':'H',
#     'number':1
# }
# hydrogen = Element(el_dict)


# class Element:
#     def __init__(self,name,symbol,number):
#         self.name = name
#         self.symbol = symbol
#         self.number = number
#
#     def dump(self):
#         print('name=%s,symbo=%s,number=%s',self.name,self.symbol,self.number)
#
# el_dict = {'name': 'Hydrogen', 'symbol': 'H', 'number': 1}
# hydrogen = Element(**el_dict)
# hydrogen.dump()

# print(hydrogen)

# class Element:
#     def __init__(self,name,symbol,number):
#         self.name = name
#         self.symbol = symbol
#         self.number = number
#
#     def __str__(self):
#         return ('name=%s,symbo=%s,number=%s' % (self.name,self.symbol,self.number))
# el_dict = {'name': 'Hydrogen', 'symbol': 'H', 'number': 1}
# hydrogen = Element(**el_dict)
# print(hydrogen)

# class Element:
#     def __init__(self,name,symbool,number):
#         self.__name = name
#         self.__symbool = symbool
#         self.__number = number
#     @property
#     def name(self):
#         return self.__name
#     @property
#     def symbool(self):
#         return self.__symbool
#
#     @property
#     def number(self):
#         return self.__number
#
# hydrogen = Element('Hydogen','H',1)
# print(hydrogen.name)


# class Bear:
#     def eats(self):
#         return 'berries'
#
# class Rabbit:
#     def eats(self):
#         return 'clover'
#
# class Octothorpe:
#     def eats(self):
#         return 'campers'
#
# b = Bear()
# r = Rabbit()
# o = Octothorpe()
#
# print(b.eats())
# print(r.eats())
# print(o.eats())

# class Laser:
#     def does(self):
#         return 'disintegrate'
#
# class Claw:
#     def does(self):
#         return 'crush'
# class SmartPhone:
#     def does(self):
#         return 'ring'
# class Robot:
#     def __init__(self):
#         self.laser = Laser()
#         self.claw = Claw()
#         self.smartphone = SmartPhone()
#     def does(self):
#         return '''I have many attachments:
#         My laser, to %s.
#         My claw, to %s.
#         My smartphone, to %s.''' % (
#         self.laser.does(),
#         self.claw.does(),
#         self.smartphone.does() )
#
# robbie = Robot()
# print(robbie.does())


